package com.hibase.core.page.entity.listxml;


import com.hibase.core.page.entity.editxml.EditEventFunctionVO;
import com.hibase.core.page.entity.window.ParamXmlVo;
import com.hibase.core.page.entity.window.ParamsXmlVo;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import com.thoughtworks.xstream.annotations.XStreamOmitField;

import lombok.Data;

import java.util.List;

/**
 * 描述:
 *
 * @author li-wei-hua
 * @date 2021-03-23 16:45
 */
@Data
public class ListButtonXmlVO {

    ////按钮权限
    @XStreamAsAttribute
    @XStreamAlias("id")
    private String id ;

    @XStreamAsAttribute
    @XStreamAlias("type")
    private String type ;

    @XStreamAsAttribute
    @XStreamAlias("title")
    private String title ;

    @XStreamAsAttribute
    @XStreamAlias("requestUrl")
    private String requestUrl ;

    ////ADD or EDIT 按钮操作类型
    @XStreamAsAttribute
    @XStreamAlias("operType")
    private String operType ;

    @XStreamAsAttribute
    @XStreamAlias("pageId")
    private String pageId ;

    @XStreamAsAttribute
    @XStreamAlias("message")
    private String message ;

    @XStreamAsAttribute
    @XStreamAlias("param")
    private String param ;

    @XStreamAsAttribute
    @XStreamAlias("enableType")
    private String enableType ;

    ////button类型 a:LISTBUTTON b:FORMBUTTON REFRESHPARENTBUTTON CLOSEWINDOWBUTTON RESETWINDOWBUTTON
    @XStreamAsAttribute
    @XStreamAlias("buttonType")
    private String buttonType ;

    //enableRule="item.status === 'enable'"
    @XStreamAsAttribute
    @XStreamAlias("enableRule")
    private String enableRule;

    /**
     * 刷新按钮
     */
    @XStreamImplicit(itemFieldName = "eventFunction")
    private List<EditEventFunctionVO> eventFunction;

    /**
     * fileEnum="TEMP"
     */
    @XStreamAsAttribute
    @XStreamAlias("fileEnum")
    private String fileEnum;

    @XStreamAsAttribute
    @XStreamAlias("hidden")
    private String hidden;

    /**
     * 文件数量支持最大
     */
    @XStreamAsAttribute
    @XStreamAlias("fileCount")
    private String fileCount;

    /**
     * 文件类型，比如：xls,xlsx
     */
    @XStreamAsAttribute
    @XStreamAlias("fileType")
    private String fileType;

    /**
     * 文件支持最大:2048
     */
    @XStreamAsAttribute
    @XStreamAlias("fileSize")
    private Integer fileSize;
    
    /**
     * List buttons支持params传参
     */
    @XStreamAlias("params")
	private ParamsXmlVo paramList;
    
    /**
     * List buttons支持params传参
     */
    @XStreamOmitField
    private List<ParamXmlVo> params;
    
    /**
	 * 宽
	 */
	@XStreamAsAttribute
	@XStreamAlias("width")
	private String width;
	
	/**
	 * 高
	 */
	@XStreamAsAttribute
	@XStreamAlias("height")
	private String height;
	
	/**
	 *  pageIdRule="list.status=='OPEN' ? 'aPage':'bPage'"
	 */
    @XStreamAsAttribute
    @XStreamAlias("pageIdRule")
    private String pageIdRule;
}
